<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/2/3 0003
  Time: 16:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title></title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="format-detection" content="telephone=no">
  <link rel="stylesheet" href="../../admin/css/x-admin.css" media="all">
  <link rel="stylesheet" href="/layui-v2.2.5/layui/css/layui.css" media="all">
</head>
<body>

<div class="x-nav" style="border-bottom: 0;">
  <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"  href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
  <form class="layui-form x-center" action="" style="width:80%">
    <div class="layui-form-pane" style="margin-top: 15px;">
      <div class="layui-form-item">
        <div class="layui-input-inline">
          <input type="text" name="activityName"  placeholder="请输入登录名" value="" autocomplete="off" class="layui-input">
        </div>
        <div class="layui-input-inline">
          <input type="text" name="activityTime"  placeholder="请输入管理员名称" value="" autocomplete="off" class="layui-input">
        </div>
        <div class="layui-input-inline" style="width:80px">
          <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </div>
      </div>
    </div>
  </form>
  <xblock>
    <button class="layui-btn" onclick="role_add('添加活动','/adminSystem/addRole','1500','700')"><i class="layui-icon">&#xe608;</i>添加活动</button>
  </xblock>
  <table class="layui-table">
    <thead>
    <tr>
      <th>序号</th>
      <th>部门名称</th>
      <th>上级部门名称</th>
      <th>管理员</th>
      <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${returnData.data.list}" var="da" varStatus="s">
      <tr>
        <td>${s.index+1}</td>
        <td>${da.name}</td>
        <td>${da.parentDepartmentId}</td>
        <td>${da.userName}</td>
        <td class="td-manage">
          <a title="编辑" href="javascript:;" onclick="findRoleInfo('修改角色','/adminSystem/findRoleInfo?rid=${da.id}','1500','700')" class="ml-5" >
            <i class="layui-icon">&#xe642;</i>
          </a>
          <a title="删除" href="javascript:;" onclick="role_del('${da.id}')">
            <i class="layui-icon">&#xe640;</i>
          </a>
        </td>
      </tr>
    </c:forEach>
    </tbody>
  </table>
  <div id="page"></div>
</div>

<script src="/js/layui/layui.all.js" charset="utf-8"></script>
<script src="/admin/js/x-layui.js" charset="utf-8"></script>
<script src="/admin/js/jquery.min.js" charset="utf-8"></script>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;"></fieldset>
<div id="fenye" style="text-align: center" ></div>
<script type="application/javascript">
    /*分页*/
    layui.use(['laypage', 'layer'], function(){
        var laypage = layui.laypage
            ,layer = layui.layer;
        //自定义排版
        laypage.render({
            elem: 'fenye'
            ,count: parseInt(${menu.totalRows})
            ,layout: ['limit', 'prev', 'page', 'next']
            ,curr: location.hash.replace('#!fenye=', '') //获取起始页
            ,hash: 'fenye' //自定义hash值
            ,jump: function(obj,first){
                var curr=obj.curr;//当前页
                var limit=obj.limit;//每页显示的条数
                //首次不执行
                if(!first){
                    //写自己的逻辑
                    window.location.href="/adminSystem/roleList?currentPage="
                        +curr+"&size="+limit;
                }else {

                }
            }
        });

    });

</script>
</body>
</html>
